Explorations of a proposed tuning system with comparisons to Pythagorean and twelve-tone equal temperament tuning

Abstract

This work describes and presents the properties of a proposed tuning system, which is compared with the well-known Pythagorean tuning system. Both systems are essentially algorithms that produce rational fractions from simple repeating algebraic rules. The rational fractions closely approximate the intervals of the twelve-tone equal temperament scale. Contrasting properties of the two algorithms are discussed, as well as the errors between the intervals they produce and the intervals of twelve-tone equal temperament. An important part of the proposed algorithm is the inverse fraction rule, which is a simple algebraic operation that produces, from any given interval, a musical inverse. The error of the musical inverse - relative to twelve-tone equal temperament - is shown to have a clear mathematical relationship with the error of the given interval fraction. If the given interval has a small error, then its musical inverse - as calculated by the inverse fraction rule - will also have a similarly small error with twelve-tone equal temperament.

Twelve-tone equal temperament tuning

In Western music, the most common tuning system since the eighteenth century has been twelve-tone equal temperament, which can be stated as follows:

  1. An octave is defined such that the upper note has twice the frequency of the lower note.
  2. The octave is divided into twelve semitones (equivalently twelve keys on a piano), which are evenly spaced on a logarithmic scale.

As a result of this paradigm, the frequency-ratio between any adjacent semitones is simply the twelfth root of two:


$$\large \sqrt[12]{2} \approx 1.05946$$


Then, an interval of $i$ semitones has the following frequency-ratio, such that the upper note is $i$ semitones above the lower note:


$$ \large 2^\frac{i}{12}$$


Note that semitones are indicated by the spacings between adjacent keys on a piano, or lines and spaces on a musical staff. It is common for semitones to also be called half-steps.

Intervals in terms of rational fractions

Intervals can also be defined in terms of rational fractions, such that the numerator and denominator indicate the integer number of wavelengths between the precise overlap (constructive interference) of two sound waves. In this case, the fraction would also give the ratio of the acoustic frequencies, or equivalently, the ratio of the wavelengths. For instance, the frequency-ratio of $\frac{3}{2}$ would mean that the lower-pitch note has a wavelength that is exactly $1.5$ times longer than the wavelength of the higher-pitch note.

This has an important auditory implication relating to the beauty, or consonance, of the interval. That is, the wavelength ratio $\frac{3}{2}$ means that the two waves overlap every three wavelengths (for the higher-pitch sound wave) and every two wavelengths (for the lower-pitch sound wave).

In the case of the interval $\frac{3}{2}$, few wavelengths are required before the two waves overlap. As a result, the interval sounds consonant, pleasing, or perfect. In fact, the interval of the frequency-ratio $\frac{3}{2}$ is called a perfect fifth. Likewise, the intervals $\frac{2}{1}$ and $\frac{1}{1}$ are called perfect octaves and perfect unisons, as only two waves and one wave are required before perfect overlap, respectively.

Likewise, an interval in which many wavelengths are required before overlap, can often sound dissonant, ugly, or even devilish - as we shall see.

A sinusoidal visualization of overlapping sound waves will be presented at the end of this document.

Proposed tuning algorithm

Begin with the fraction $\large \frac{2}{1}$.

  1. Multiply the inverse by two to get the musical inverse. (Inverse fraction rule.)
  2. Add one to the numerator and denominator to get the next interval.
  3. Apply steps one and two to the next interval.

That is, we start with $\large \frac{2}{1}$, a perfect octave. Following the 1st rule:

$$\frac{2}{1} \rightarrow \frac{2}{2} = \frac{1}{1}$$

The result is a perfect unison (the inverse of a perfect octave). Then, following the 2nd rule:

$$\frac{2 + 1}{1 + 1} = \frac{3}{2}$$

The result is a perfect fifth. Next, repeat the two steps until (nearly) all the intervals of the twelve-tone scale are obtained.

Pythagorean tuning algorithm

Begin with the interval $\large (\frac{2}{3})^6 (2)^4$, which is $\large \frac{1024}{729}$

  1. Subtract one from both exponents to get the next interval.
  2. From that interval, subtract one from only the first exponent to get the next interval.
  3. Apply steps one and two to the next interval.

The pattern is only broken when the first exponent becomes zero, such that the first exponent remains zero for two intervals in a row.

That is, we start with $\large (\frac{2}{3})^6 (2)^4 = \frac{1024}{729}$, a diminished fifth. Following the 1st rule, we get: $\large (\frac{2}{3})^5 (2)^3 = \frac{256}{243}$, a minor second. Then, following the 2nd rule, we get: $\large (\frac{2}{3})^4 (2)^3 = \frac{128}{81}$, a minor sixth. Etc.

Comparing the two algorithms

The progression of the proposed algorithm

  • Perfect Octave $\large \frac{2}{1}$

    Take the inverse of $\frac{2}{1}$ and multiply by two...

    </p>

  • Perfect Unison $\large \frac{2}{2} = \frac{1}{1}$

    Take $\frac{2}{1}$ and add one to the numerator and denominator...

    </p>



  • Perfect Fifth $\large \frac{3}{2}$

    Take the inverse of $\frac{3}{2}$ and multiply by two...



  • Perfect Fourth $\large \frac{4}{3}$

    Take $\frac{3}{2}$ and add one to the numerator and denominator...





  • Perfect Fourth $\large \frac{4}{3}$

    Take the inverse of $\frac{4}{3}$ and multiply by two...



  • Perfect Fifth $\large \frac{6}{4} = \frac{3}{2}$

    Take $\frac{4}{3}$ and add one to the numerator and denominator...





  • Major Third $\large \frac{5}{4}$

    Take the inverse of $\frac{5}{4}$ and multiply by two...



  • Minor Sixth $\large \frac{8}{5}$

    Take $\frac{5}{4}$ and add one to the numerator and denominator...





  • Minor Third $\large \frac{6}{5}$

    Take the inverse of $\frac{6}{5}$ and multiply by two...



  • Major Sixth $\large \frac{10}{6} = \frac{5}{3}$

    Take $\frac{6}{5}$ and add one to the numerator and denominator...





  • Major Second $\large \frac{7}{6}$

    Take the inverse of $\frac{7}{6}$ and multiply by two...



  • Minor Seventh $\large \frac{12}{7}$

    Take $\frac{7}{6}$ and add one to the numerator and denominator...





  • Minor Second $\large \frac{8}{7}$

    Take the inverse of $\frac{8}{7}$ and multiply by two...



  • Major Seventh $\large \frac{14}{8} = \frac{7}{4}$

Close approximations to all of the intervals in twelve-tone equal temperament have thus been calculated, except for the tritone.

The progression of the Pythagorean algorithm

  • Diminished Fifth $\large \frac{1024}{729}$

  • Minor Second $\large \frac{256}{243}$

  • Minor Sixth $\large \frac{128}{81}$

  • Minor Third $\large \frac{32}{27}$

  • Minor Seventh $\large \frac{16}{9}$

  • Perfect Fourth $\large \frac{4}{3}$

  • Perfect Octave $\large \frac{2}{1}$

  • Perfect Unison $\large \frac{1}{1}$

  • Perfect Fifth $\large \frac{3}{2}$

  • Major Second $\large \frac{9}{8}$

  • Major Sixth $\large \frac{27}{16}$

  • Major Third $\large \frac{81}{64}$

  • Major Seventh $\large \frac{243}{128}$

  • Augmented Fourth $\large \frac{729}{512}$

Close approximations to all of the intervals in twelve-tone equal temperament have thus been calculated.

Differing properties of the proposed and Pythagorean tuning algorithms

Properties that make the proposed system relatively more beautiful

  • The proposed algorithm follows a natural progression from consonant to dissonant intervals, whereas the Pythagorean algorithm oscillates back and forth between consonant and dissonant.
  • The proposed algorithm has a continuous and unbroken pattern, whereas the Pythagorean algorithm has one break in the pattern.
  • The rules of proposed algorithm are arguably simpler (and more memorable).
  • The proposed algorithm produces rational fractions with smaller (and more memorable) integers.

Properties that make the proposed system relatively less beautiful

  • The proposed algorithm never reaches the interval of six semitones - also known as the tritone. This could arguably be considered a beautiful property as the tritone has long been called the 'Devil in music'. Under twelve-tone equal temperament - the tritone has a frequency-ratio of $\sqrt 2$, for which a close approximation by a rational fraction of wavelengths would mean that many sound waves are required before overlap.
  • The proposed algorithm obtains some fractions multiple times, whereas the Pythagorean algorithm obtains each fraction only once. Even still, the Pythagorean algorithm obtains an approximation to the tritone on two occasions - the first is slightly lower (flat) and the second is slightly higher (sharp).
  • The proposed algorithm has a larger average error with twelve-tone equal temperament: 1.91% vs 0.258%.
  • The proposed algorithm produces some reducible fractions, whereas all of the fractions produced by the Pythagorean algorithm are irreducible.

Note about adding one to the numerator and denominator (proposed algorithm)

While it is clear - by the argument of overlap described earlier - why adding one to the numerator and denominator produces increasingly dissonant intervals, it remains unclear (to the author) why this rule produces close approximations to the twelve-tone intervals.

Discussion of the inverse fraction rule

Musical inverse (two equivalent approaches)

A musical inverse of an interval essentially means switching the order of the notes. An inverse-fraction rule is shown for finding the musical inverse.

Consider the initial interval of a perfect fifth in which the upper note is G and the lower note is C.

1. Inverse fraction rule

Before switching, the upper note (G) has $\frac{3}{2}$ the frequency of the lower note (C). That means the frequency-ratio of the lower note (C) to the upper note (G) is simply the mathematical inverse: $\frac{2}{3}$.

When the musical inverse is taken, the lower note is placed an octave higher and thus obtains twice the frequency. In mathematical terms, the ratio of the frequencies changes as follows when the inverse is taken:


$$\large \frac{f_C}{f_G} = \frac{2}{3} \xrightarrow[\text{higher}]{\text{octave}} \frac{2\times2}{3} = \frac{4}{3}$$


Where $f_C$ is the frequency of C and $f_G$ is the frequency of G.

In short, the musical inverse of an interval is found by taking the inverse of the frequency-ratio and multiplying by two - a simple rule, which I have named the inverse fraction rule.

The proposed algorithm uses this method to obtain the musical inverse of notes. The inverse fraction rule also has an equivalent in twelve-tone equal temperament tuning.

2. Twelve-tone equal temperament inverse

In twelve-tone equal temperament tuning: if the notes were initially $i$ semitones apart (equivalently $i$ keys apart on a piano), they will be $12-i$ semitones apart after taking the musical inverse.

This is shown to be equivalent to the inverse fraction rule:

Let the upper note be $i$ semitones above the lower note. Then the initial frequency-ratio is the following:


$$\large \frac{f_1}{f_2} = \large 2^\frac{i}{12}$$


The musical inverse is still the frequency-ratio such that the previous lower note is placed an octave higher:


$$\large \frac{f_2}{f_1} = \large \frac{1}{2^\frac{i}{12}} \xrightarrow[\text{higher}]{\text{octave}} \frac{2}{ 2^\frac{i}{12}} = 2^{\frac{12-i}{12}}$$


Thus, the previous lower note is now $12 - i$ semitones above the previous upper note. In the earlier case of the perfect fifth, G was $7$ semitones above C. After taking the inverse, C became $12 - 7 = 5$ semitones above G, which is a perfect fourth.


$$\large 2^{\frac{i}{12}} \xrightarrow[\text{inverse}]{\text{musical}} 2^{\frac{12-i}{12}}$$


The relationship between the error of the inverse fraction of an interval and the error of the initial interval

Let $a$ and $b$ be non-zero real numbers. In the case of the twelve-tone scale: $a$ and $b$ are positive - representing wavelengths or frequencies, $n = 12$, and $k = 2$. However, we will show the result to be true in general.

We would like to show that if a given fraction has a small error with an interval in twelve-tone equal temperament, than the musical inverse of that fraction, as calculated by the inverse fraction rule, will also have a small error.

That is, if:

$$\large \frac{a}{b} \approx k^\frac{i}{n}$$

Then:

$$\large \frac{kb}{a} \approx k^\frac{n - i}{n}$$

Proof:

Define $\epsilon$ as the initial error:

$$\large \epsilon = \frac{\frac{a}{b}}{k^\frac{i}{n}} - 1$$

Define $\gamma$ in terms of $\epsilon$:

$$\large \gamma = \epsilon + 1$$

Then we have:

$$\large \frac{a}{b} = \gamma k^\frac{i}{n}$$

Rearranging algebraically, we get:


$$\large \frac{kb}{a} = \frac{1}{\gamma} k^{\frac{n-i}{n}}$$

As $\epsilon \rightarrow 0$, we have that $\gamma \rightarrow 1$. Therefore:

$$\large \frac{kb}{a} \rightarrow k^{\frac{n-i}{n}}$$

In summary, if the initial interval has an error-ratio with twelve-tone equal temperament of $\gamma$, the resultant musical inverse (following the inverse fraction rule) will have an error-ratio of $\frac{1}{\gamma}$.

In [1]:
import tuning
In [2]:
tuning.plot_errors()
In [3]:
tuning.plot_abs_errors()

Visualization of the tuning algorithm and its correspondence with the Pythagorean algorithm and twelve-tone equal temperament

In [4]:
tuning.show_algorithm()

Perfect Octave

(Perfect Consonant)
12 semitones

Twelve-Tone Equal Temperament:
2 ^ (12 / 12)
As Decimal:
2.0

Proposed tuning:
2 / 1
As Decimal:
2.0

Pythagorean tuning:
2 / 1
As Decimal:
2.0

Error between Proposed tuning and Twelve-tone equal temperament:
0.000%
Error between Pythagorean tuning and Twelve-tone equal temperament:
0.000%




Proposed Tuning Algorithm:
Multiply the denominator by 2 and switch the numerator and denominator to get the inverse.
__________________________________________________________________________________________________

Perfect Unison

(Perfect Consonant)
Inverse of Perfect Octave
0 semitones

Twelve-Tone Equal Temperament:
2 ^ (0 / 12)
As Decimal:
1.0

Proposed tuning:
2 / 2 = 1 / 1
As Decimal:
1.0

Pythagorean tuning:
1 / 1
As Decimal:
1.0

Error between Proposed tuning and Twelve-tone equal temperament:
0.000%
Error between Pythagorean tuning and Twelve-tone equal temperament:
0.000%




Proposed Tuning Algorithm:
Add 1 to the numerator and denominator of the last non-inverse fraction: 1 / 0
__________________________________________________________________________________________________

Perfect Fifth

(Perfect Consonant)
7 semitones

Twelve-Tone Equal Temperament:
2 ^ (7 / 12)
As Decimal:
1.4983

Proposed tuning:
3 / 2
As Decimal:
1.5

Pythagorean tuning:
3 / 2
As Decimal:
1.5

Error between Proposed tuning and Twelve-tone equal temperament:
-0.113%
Error between Pythagorean tuning and Twelve-tone equal temperament:
-0.113%




Proposed Tuning Algorithm:
Multiply the denominator by 2 and switch the numerator and denominator to get the inverse.
__________________________________________________________________________________________________

Perfect Fourth

(Perfect Consonant)
Inverse of Perfect Fifth
5 semitones

Twelve-Tone Equal Temperament:
2 ^ (5 / 12)
As Decimal:
1.3348

Proposed tuning:
4 / 3
As Decimal:
1.3333333333333333

Pythagorean tuning:
4 / 3
As Decimal:
1.3333333333333333

Error between Proposed tuning and Twelve-tone equal temperament:
0.113%
Error between Pythagorean tuning and Twelve-tone equal temperament:
0.113%




Proposed Tuning Algorithm:
Add 1 to the numerator and denominator of the last non-inverse fraction: 3 / 2
__________________________________________________________________________________________________

Perfect Fourth

(Perfect Consonant)
5 semitones

Twelve-Tone Equal Temperament:
2 ^ (5 / 12)
As Decimal:
1.3348

Proposed tuning:
4 / 3
As Decimal:
1.3333333333333333

Pythagorean tuning:
4 / 3
As Decimal:
1.3333333333333333

Error between Proposed tuning and Twelve-tone equal temperament:
0.113%
Error between Pythagorean tuning and Twelve-tone equal temperament:
0.113%




Proposed Tuning Algorithm:
Multiply the denominator by 2 and switch the numerator and denominator to get the inverse.
__________________________________________________________________________________________________

Perfect Fifth

(Perfect Consonant)
Inverse of Perfect Fourth
7 semitones

Twelve-Tone Equal Temperament:
2 ^ (7 / 12)
As Decimal:
1.4983

Proposed tuning:
6 / 4 = 3 / 2
As Decimal:
1.5

Pythagorean tuning:
3 / 2
As Decimal:
1.5

Error between Proposed tuning and Twelve-tone equal temperament:
-0.113%
Error between Pythagorean tuning and Twelve-tone equal temperament:
-0.113%




Proposed Tuning Algorithm:
Add 1 to the numerator and denominator of the last non-inverse fraction: 2 / 1
__________________________________________________________________________________________________

Major Third

(Imperfect Consonant)
4 semitones

Twelve-Tone Equal Temperament:
2 ^ (4 / 12)
As Decimal:
1.2599

Proposed tuning:
5 / 4
As Decimal:
1.25

Pythagorean tuning:
81 / 64
As Decimal:
1.265625

Error between Proposed tuning and Twelve-tone equal temperament:
0.787%
Error between Pythagorean tuning and Twelve-tone equal temperament:
-0.453%




Proposed Tuning Algorithm:
Multiply the denominator by 2 and switch the numerator and denominator to get the inverse.
__________________________________________________________________________________________________

Minor Sixth

(Imperfect Consonant)
Inverse of Major Third
8 semitones

Twelve-Tone Equal Temperament:
2 ^ (8 / 12)
As Decimal:
1.5874

Proposed tuning:
8 / 5
As Decimal:
1.6

Pythagorean tuning:
128 / 81
As Decimal:
1.5802469135802468

Error between Proposed tuning and Twelve-tone equal temperament:
-0.794%
Error between Pythagorean tuning and Twelve-tone equal temperament:
0.451%




Proposed Tuning Algorithm:
Add 1 to the numerator and denominator of the last non-inverse fraction: 5 / 4
__________________________________________________________________________________________________

Minor Third

(Imperfect Consonant)
3 semitones

Twelve-Tone Equal Temperament:
2 ^ (3 / 12)
As Decimal:
1.1892

Proposed tuning:
6 / 5
As Decimal:
1.2

Pythagorean tuning:
32 / 27
As Decimal:
1.1851851851851851

Error between Proposed tuning and Twelve-tone equal temperament:
-0.908%
Error between Pythagorean tuning and Twelve-tone equal temperament:
0.338%




Proposed Tuning Algorithm:
Multiply the denominator by 2 and switch the numerator and denominator to get the inverse.
__________________________________________________________________________________________________

Major Sixth

(Imperfect Consonant)
Inverse of Minor Third
9 semitones

Twelve-Tone Equal Temperament:
2 ^ (9 / 12)
As Decimal:
1.6818

Proposed tuning:
10 / 6 = 5 / 3
As Decimal:
1.6666666666666667

Pythagorean tuning:
27 / 16
As Decimal:
1.6875

Error between Proposed tuning and Twelve-tone equal temperament:
0.899%
Error between Pythagorean tuning and Twelve-tone equal temperament:
-0.339%




Proposed Tuning Algorithm:
Add 1 to the numerator and denominator of the last non-inverse fraction: 3 / 2
__________________________________________________________________________________________________

Major Second

(Disonnant)
2 semitones

Twelve-Tone Equal Temperament:
2 ^ (2 / 12)
As Decimal:
1.1225

Proposed tuning:
7 / 6
As Decimal:
1.1666666666666667

Pythagorean tuning:
9 / 8
As Decimal:
1.125

Error between Proposed tuning and Twelve-tone equal temperament:
-3.938%
Error between Pythagorean tuning and Twelve-tone equal temperament:
-0.226%




Proposed Tuning Algorithm:
Multiply the denominator by 2 and switch the numerator and denominator to get the inverse.
__________________________________________________________________________________________________

Minor Seventh

(Dissonant)
Inverse of Major Second
10 semitones

Twelve-Tone Equal Temperament:
2 ^ (10 / 12)
As Decimal:
1.7818

Proposed tuning:
12 / 7
As Decimal:
1.7142857142857142

Pythagorean tuning:
16 / 9
As Decimal:
1.7777777777777777

Error between Proposed tuning and Twelve-tone equal temperament:
3.789%
Error between Pythagorean tuning and Twelve-tone equal temperament:
0.226%




Proposed Tuning Algorithm:
Add 1 to the numerator and denominator of the last non-inverse fraction: 7 / 6
__________________________________________________________________________________________________

Minor Second

(Dissonant)
1 semitones

Twelve-Tone Equal Temperament:
2 ^ (1 / 12)
As Decimal:
1.0595

Proposed tuning:
8 / 7
As Decimal:
1.1428571428571428

Pythagorean tuning:
256 / 243
As Decimal:
1.0534979423868314

Error between Proposed tuning and Twelve-tone equal temperament:
-7.871%
Error between Pythagorean tuning and Twelve-tone equal temperament:
0.563%




Proposed Tuning Algorithm:
Multiply the denominator by 2 and switch the numerator and denominator to get the inverse.
__________________________________________________________________________________________________

Major Seventh

(Dissonant)
Inverse of Minor Second
11 semitones

Twelve-Tone Equal Temperament:
2 ^ (11 / 12)
As Decimal:
1.8877

Proposed tuning:
14 / 8 = 7 / 4
As Decimal:
1.75

Pythagorean tuning:
243 / 128
As Decimal:
1.8984375

Error between Proposed tuning and Twelve-tone equal temperament:
7.297%
Error between Pythagorean tuning and Twelve-tone equal temperament:
-0.566%
__________________________________________________________________________________________________